<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> <%
String path = request.getContextPath(); String basePath =
request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE html>
<!--[if IE 7]><html class="ie7 lt-ie10"><![endif]-->
<!--[if IE 8]><html class="ie8 lt-ie10"><![endif]-->
<!--[if IE 9]><html class="ie9 lt-ie10"><![endif]-->
<!--[if gt IE 9]><!-->
<html>
<!--<![endif]-->
<head>
<meta charset="utf-8" />
<title>阿猫来了的设置_美丽说</title>
<base href="<%=basePath%>">
<meta name="description"
	content="美丽说, 只做正确流行款. 独家冠名《奔跑吧兄弟》! 平台聚集强大的资深时尚买手团队, 每日推出正确新款, 传授最权威的穿衣经验, 全方位解读搭配技巧, 打造当季最前沿的正确流行款!" />
<meta name="keywords" content="美丽说,higo,衣服,鞋子,包包,配饰,家居,美妆,搭配,团购,美丽说higo" />
<link rel="dns-prefetch" href="http://s.meilishuo.net/">
<link rel="dns-prefetch" href="http://i.meilishuo.net/">
<link rel="dns-prefetch" href="http://d01.res.meilishuo.net/">
<link rel="dns-prefetch" href="http://d02.res.meilishuo.net/">
<link rel="dns-prefetch" href="http://d03.res.meilishuo.net/">
<link rel="dns-prefetch" href="http://d04.res.meilishuo.net/">
<link rel="dns-prefetch" href="http://d05.res.meilishuo.net/">
<meta http-equiv="x-ua-compatible" content="IE=edge,chrome=1" />
<link rel="stylesheet" type="text/css"
	href="pc/css/base.css?1607171729.25" />
<link rel="icon"
	href="pic/_o/75/6e/2f6871f198c0bd7615ffbf9a2f5f_49_48.c5.png"
	type="image/x-icon" />
<link rel="stylesheet" type="text/css"
	href="pc/css/page/account/common.css?1607171729.25" />
<link rel="stylesheet" type="text/css"
	href="pc/css/page/account/setPassword.css?1607171728.25" />
<script type="text/javascript" src="pc/jsmin/fml.js?1"></script>
</head>
<body>
	<jsp:include page="common/header.jsp"></jsp:include>
	<div class="settings">
		<jsp:include page="common/userleft.jsp"></jsp:include>
		<div class="settings_box">
			<strong class="settings_title">支付密码</strong>
			<fieldset class="setPersonal">
				<form id="setPayPasswordForm">
					<c:if test="${user.paypwd!=null}">
					<div class="form-list" id="old-form">
						<label class="account-label" for="old_password">当前密码</label> <input
							style="display: none">
						<!-- for disable autocomplete on chrome -->
						<input autocomplete="off" class="l_ipt" id="old_password"
							name="paypwd" type="password" value="" /> <strong
							style="display: none;"></strong>
						<!-- <a id="forget"><strong>忘记密码？</strong></a> -->
					</div>
					</c:if>
					<div class="form-list">
						<label class="account-label" for="new_password">新密码</label> <input
							style="display: none">
						<!-- for disable autocomplete on chrome -->
						<input autocomplete="off" class="l_ipt" id="new_password"
							<c:if test="${user.paypwd!=null }">name="newPayPwd"</c:if>
							<c:if test="${user.paypwd==null }">name="paypwd"</c:if>
							 type="password" value="" /> <strong></strong>
					</div>
					<div class="form-list">
						<label class="account-label" for="confirm_password">确认密码</label> <input
							style="display: none">
						<!-- for disable autocomplete on chrome -->
						<input autocomplete="off" class="l_ipt" id="confirm_password"
							name="confirm_password" type="password" value="" /> <strong
							class="setPasswordErrorMessageLine"></strong>
					</div>
					<input type="button" onclick="updPayPwd();" value="确 认" id="submit" class="ext_submit" />
					<span class="submit_error"></span>
				</form>
				</filedset>
		</div>
	</div>
	<script type="text/javascript">
		function updPayPwd(){
			$.ajax({
		        cache:true,
		        type: "POST",
		        url:'/users/updPayPwd',
		        data:$('#setPayPasswordForm').serialize(),// 你的formid
		        async: false,
		        dataType:"json",
		        error: function(request) {
		            alert("Connection error");
		        },
		        success:function(data) {
		        	if(data){
		        		layer.msg('保存成功！',{icon:1,time:1500});
		        		setTimeout(function(){//两秒后跳转  
		                   location.reload();
		                },1500);
		        	}else{
		        		layer.msg('保存失败，请确认密码是否输入正确后再试！',{icon:2,time:1500});
		        	}
		        }
		    });
		}
	</script>
	<jsp:include page="common/footer.jsp"></jsp:include>
	<jsp:include page="common/right.jsp"></jsp:include>
</html>